package com.navinfo.platform.etl.enums;

import java.util.Arrays;

/**
 * 系统类型：1东风，2青汽，3一汽，4红岩
 * @author: web
 * @data : 2020-09-04
 **/
public enum SystemType {
    DF(1,"东风"),
    QQ(2,"青汽"),
    YQ(3,"一汽"),
    HY(4,"红岩");
    /**
     * 系统类型编码
     */
    private int type;
    /**
     * 系统类型描述
     */
    private String desc;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    SystemType(int type, String desc){
        this.setType(type);
        this.setDesc(desc);
    }

    public static SystemType valueOf(int type){
        return Arrays.stream(values()).filter(e ->e.type == type).findFirst().get();
    }
}
